<?php 
$slide = &$slides;
if (empty($slide)) die("No result"); // FIXME do this the clean way

$link='slideshow/'.$slide['Feed']['id'].'/%s';

// automagical timer to jump to the next slide
/*echo $javascript->codeBlock(
    "pageTransition('".$this->webroot."slides/".$mypaging->nextPage($link)."', 
				'".$slide['Slide']['duration']."000');");
*/
    // links to the slides for later purposes
    /*echo $ajax->link('First Page', 
                     $mypaging->firstPage($link), 
                     array('update'   => 'slide',
                           'type'     => 'asynchronous',
                           'loading' => 'myEffect.toggle()',
                           'complete'  => 'myEffect.toggle()'
                           )
                     ).' - ';
    
    echo $ajax->link('First Page', $mypaging->firstPage($link), array('update' => 'slide')).' - ';
    echo $ajax->link('Previous Page', $mypaging->previousPage($link), array('update' => 'slide')).' - ';
    echo $ajax->link('Next Page', $mypaging->nextPage($link), array('update' => 'slide')).' - ';
    echo $ajax->link('Last Page', $mypaging->lastPage($link), array('update' => 'slide')).'<br />';
    */
//echo $slide['Feed']['id'].' - '.$slide['Feed']['name'].' - '.
//     $slide['Feed']['site_url'].' - '.$slide['Feed']['description'];    


// FIXME check if this is working correctly
if ('' != $slide['Slide']['ext_url'])
    include($slide['Slide']['ext_url']); // TODO use curl functions
elseif (true == $slide['Slide']['exec_php']) //TODO check permission of user !
	eval($slide['Slide']['body']);
else 
    echo $slide['Slide']['body'];
?>
<!--p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p>
<table>
<?php 
    $th = array ('id', 'title', 'body', 'ext_url', 'exec_php', 'created', 'duration', 'visible', 'order', 'show_from', 'show_till','feed_id');
    //echo $html->tableHeaders($th); 
   // echo $html->tableCells($slide['Slide'], Array('style'=> 'background-color:#E2E2E2'), Array('style'=>'background:transparent'));  
?>
</table-->